/* 
 * Copyright (c) 2004-2005 Massachusetts Institute of Technology. This code was
 * developed as part of the Haystack (http://haystack.lcs.mit.edu/) research 
 * project at MIT. Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation files (the 
 * "Software"), to deal in the Software without restriction, including without 
 * limitation the rights to use, copy, modify, merge, publish, distribute, 
 * sublicense, and/or sell copies of the Software, and to permit persons to whom
 * the Software is furnished to do so, subject to the following conditions: 
 * 
 * The above copyright notice and this permission notice shall be included in 
 * all copies or substantial portions of the Software. 
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER  
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE. 
 */
/*
 * Created on Jan 30, 2005
 *
 */
package edu.mit.csail.relo.jdt.parts;

import org.openrdf.model.URI;

import edu.mit.csail.relo.ReloCore;
import edu.mit.csail.relo.jdt.RJCore;
import edu.mit.csail.relo.store.ReloRdfRepository;
import edu.mit.csail.relo.store.ReloStoreInitializer;
import edu.mit.csail.relo.store.StoreUtil;


public class JDTEditPartsModel implements ReloStoreInitializer {
	

	public void initRepository(ReloRdfRepository reloRepo) {
        URI rdfsLabel = ReloRdfRepository.rdfsLabel;
        String pluginId = RJCore.PLUGIN_ID;

        reloRepo.addStatement(RJCore.classType, 	rdfsLabel, "Class");
        reloRepo.addStatement(RJCore.interfaceType,	rdfsLabel, "Interface");
        reloRepo.addStatement(RJCore.fieldType,		rdfsLabel, "Field");
        reloRepo.addStatement(RJCore.methodType,	rdfsLabel, "Method");
        reloRepo.addStatement(RJCore.packageType,	rdfsLabel, "Package");
        reloRepo.addStatement(RJCore.projectType,	rdfsLabel, "Project");


        reloRepo.addStatement(RJCore.classType, 	ReloCore.controller, StoreUtil.getClassLoc(pluginId, ClassEditPart.class));
        reloRepo.addStatement(RJCore.interfaceType,	ReloCore.controller, StoreUtil.getClassLoc(pluginId, ClassEditPart.class));
        reloRepo.addStatement(RJCore.fieldType, 	ReloCore.controller, StoreUtil.getClassLoc(pluginId, FieldEditPart.class));
        reloRepo.addStatement(RJCore.methodType, 	ReloCore.controller, StoreUtil.getClassLoc(pluginId, MethodEditPart.class));
        reloRepo.addStatement(RJCore.packageType, 	ReloCore.controller, StoreUtil.getClassLoc(pluginId, PackageEditPart.class));
        //reloRepo.addStatement(RJCore.projectType,	RJCore.controller, classPath + "???");

        reloRepo.addStatement(RJCore.inherits,      rdfsLabel, "inherits");
        reloRepo.addStatement(RJCore.calls,         rdfsLabel, "calls");
        reloRepo.addStatement(RJCore.refType,       rdfsLabel, "refers");
        reloRepo.addStatement(RJCore.overrides,     rdfsLabel, "overrides");

        reloRepo.addStatement(RJCore.inherits,	ReloCore.controller, StoreUtil.getClassLoc(pluginId, InheritanceRelationPart.class)); 
        reloRepo.addStatement(RJCore.calls,		ReloCore.controller, StoreUtil.getClassLoc(pluginId, MethodCallRelationPart.class)); 
        reloRepo.addStatement(RJCore.refType,	ReloCore.controller, StoreUtil.getClassLoc(pluginId, TypeRefRelationPart.class)); 
        reloRepo.addStatement(RJCore.overrides,	ReloCore.controller, StoreUtil.getClassLoc(pluginId, OverridesRelationPart.class)); 
    }

}